<?php

class My_Plugin_ActionSetup extends Zend_Controller_Plugin_Abstract
{

  public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
  {
    $front = Zend_Controller_Front::getInstance();

    //creates ActionStack if required
    if(!$front->hasPlugin('Zend_Controller_Plugin_Action'))
      {
	$actionStack = new Zend_Controller_Plugin_ActionStack();
	$front->registerPlugin($actionStack, 97);
      }
    else
      {
	$actionStack = $front->getPlugin('Zend_Controller_Plugin_ActionStack');
      }

    //add menu action
    /*$menuAction = clone($request);
    $menuAction->setActionName('menu')->setControllerName('index');
    $actionStack->pushStack($menuAction);*/

    //adds advert action
    //$advertAction = clone($request);
    //$advertAction->setActionName('advert')->setControllerName('index');
    //$actionStack->pushStack($advertAction);
  }


  //close class
}